Skip to content

Conversation

@nikosdouvlis
Copy link
Member

@nikosdouvlis nikosdouvlis commented Feb 3, 2026

Summary

Wire clerkUIVersion option through all framework packages to allow specifying a custom @clerk/ui version.

  • Add clerkUIVersion to Astro's AstroClerkIntegrationParams type
  • Pass through environment variables for all framework packages

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Introduced clerkUIVersion across integrations (Next.js, Nuxt, React Router, TanStack React Start, Express, Astro).
    • Exposes UI version via public/runtime envs and includes it in provider/init state and script options so version flows to clients.
  • Chores

    • Added a changeset to mark these packages for patch updates.

Why:
The `clerkUIVersion` prop was typed in `@clerk/shared/types` but never wired through framework packages, making it effectively dead code. Users could pass the prop without TypeScript errors, but it would be silently ignored. This mirrors the existing `clerkJSVersion` functionality for `@clerk/ui`.

What changed:
- Added `NEXT_PUBLIC_CLERK_UI_VERSION` env var support to Next.js
- Added `PUBLIC_CLERK_UI_VERSION` env var support to Astro
- Added `VITE_CLERK_UI_VERSION` env var support to React Router and Tanstack Start
- Added `CLERK_UI_VERSION` env var support to Express
- Added `NUXT_PUBLIC_CLERK_UI_VERSION` env var support to Nuxt
- Wired the prop through SSR state for React Router and Tanstack Start
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 10, 2026 1:38am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 1b36a20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@clerk/astro Patch
@clerk/express Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This pull request threads a new Clerk UI version field through multiple packages. It adds CLERK_UI_VERSION / NEXT_PUBLIC_CLERK_UI_VERSION environment exposures, introduces clerkUIVersion into environment loaders and runtime config, and propagates clerkUIVersion and clerkUIUrl into provider/state shapes and script URL builders across Astro, Express, Next.js, Nuxt, React Router, and TanStack React Start packages. No control-flow changes; changes are additions to returned objects, constants, types, and config values.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the changeset: wiring clerkUIVersion through multiple framework packages for consistent UI version configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/react-router/src/server/utils.ts (1)

80-103: ⚠️ Potential issue | 🟠 Major

Add tests for clerkUIVersion propagation before merge.

This PR introduces a new runtime configuration path (__clerkUIVersion in the SSR clerk state), but no tests were added/updated to cover it. Please add a unit or integration test to validate that the env var is correctly read and serialized into the response state.

packages/react-router/src/client/types.ts (1)

6-28: ⚠️ Potential issue | 🟠 Major

Add tests for clerkUIVersion env/config propagation.

No tests were added or updated for this multi-framework change (env parsing, runtime config, script URL generation). Please add coverage to ensure the new clerkUIVersion wiring is respected end‑to‑end before merge.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 3, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7740

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7740

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7740

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7740

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7740

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7740

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7740

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7740

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7740

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7740

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7740

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7740

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7740

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7740

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7740

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7740

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7740

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7740

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7740

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7740

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7740

commit: 1b36a20

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/astro/src/integration/create-integration.ts`:
- Around line 177-180: The object literal defines PUBLIC_CLERK_UI_VERSION twice;
remove the duplicate entry so only one envField.string({ context: 'client',
access: 'public', optional: true }) remains for PUBLIC_CLERK_UI_VERSION (keep
the existing one at line that first defines PUBLIC_CLERK_UI_VERSION and delete
the later duplicate), ensuring there are no duplicated keys in the mapping
alongside PUBLIC_CLERK_PREFETCH_UI and PUBLIC_CLERK_UI_URL.

@nikosdouvlis nikosdouvlis merged commit ed8dc4d into main Feb 11, 2026
39 checks passed
@nikosdouvlis nikosdouvlis deleted the nk/wire-clerk-ui-version branch February 11, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants